﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using DataAnnotationsExtensions;
using MvcEnumDropDownList.Helpers;

namespace BenzInfo.Hockey.Grenadiers.Models
{
    [Table("Staff")]
    public class Staff : Person
    {
        [LocalizationEnum(typeof(Resources.Models.Staff))]
        public enum CategoryEnum : byte
        {
            Management = 1,
            Coaches,
            TrainingStaff
        }

        [Required]
        [EnumDataType(typeof(CategoryEnum))]
        public int CategoryValue { get; set; }
        
        [Display(Name = "DisplayCategory", ResourceType = typeof(Resources.Models.Staff))]
        public CategoryEnum Category {
            get { return (CategoryEnum)CategoryValue; }
            set { CategoryValue = (int)value; }
        }

        [Email]
        [StringLength(100)]
        [Display(Name = "DisplayEmail", ResourceType = typeof(Resources.Models.Staff))]
        public string Email { get; set; }

        [Required]
        [StringLength(50, MinimumLength = 2)]
        [Display(Name = "DisplayTitleEN", ResourceType = typeof(Resources.Models.Staff))]
        public string TitleEN { get; set; }

        [Required]
        [StringLength(50, MinimumLength = 2)]
        [Display(Name = "DisplayTitleFR", ResourceType = typeof(Resources.Models.Staff))]
        public string TitleFR { get; set; }
    }
}